﻿Imports System.Data.SqlClient
Public Class Users
    Public Shared Function getUser() As SortedList
        Dim cmd As New SqlCommand("SELECT * FROM  system.[User]", Dbinterface.Connection)

        Dim reader As SqlDataReader = cmd.ExecuteReader
        Dim list As New SortedList
        While reader.Read
            Dim user As New UserInfo
            With user
                .UserId = reader("UserId").ToString
                .UserName = reader("UserName").ToString
                .FullName = reader("FullName").ToString
                .Active = reader("Active").ToString
                list.Add(user.UserId, user)

            End With
        End While
        reader.Close()
        reader = Nothing
        cmd = Nothing
        Return list
    End Function
End Class
